﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Presidenta.Master" AutoEventWireup="true" CodeBehind="BuscarTarea.aspx.cs" Inherits="Interfaces.Tareas.BuscarTarea" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 158px;
        }
        .style5
        {
            width: 192px;
        }
        .style11
        {
            width: 299px;
        }
        .style14
        {
            width: 170px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        </asp:ScriptManagerProxy>
        <asp:Panel ID="Panel1" runat="server" GroupingText="Buscar Tarea" 
            style="text-align: left">
        
            <table class="style1">
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        <asp:RadioButton ID="RadioButton2" runat="server" 
                            Text="Tareas sin relacion a ningun programa" AutoPostBack="True" 
                            Checked="True" GroupName="asdf" 
                            oncheckedchanged="RadioButton2_CheckedChanged" />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        <asp:RadioButton ID="RadioButton1" runat="server" 
                            Text="Tareas relacionadas a programas" AutoPostBack="True" 
                            GroupName="asdf" oncheckedchanged="RadioButton1_CheckedChanged" />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        <asp:Panel ID="Panel2" runat="server" GroupingText="Buscar">

            <table class="style1">
                <tr>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style11">
                        <asp:RadioButton ID="RadioButton3" runat="server" 
                            Text="Por nombre y Gestion Especifica" AutoPostBack="True" Checked="True" 
                            GroupName="fdsa" oncheckedchanged="RadioButton3_CheckedChanged" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </td>
                    <td>
                        <asp:RadioButton ID="RadioButton4" runat="server" Text="Por Gestiones" 
                            AutoPostBack="True" GroupName="fdsa" 
                            oncheckedchanged="RadioButton4_CheckedChanged" />
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style5">
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label4" runat="server" Text="Nombre de la Tarea:&nbsp;"></asp:Label>
                    </td>
                    <td class="style11">
                        <asp:TextBox ID="TextBox1" runat="server" Width="152px" MaxLength="20"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;<asp:Label ID="Label5" runat="server" Text="Gestion:"></asp:Label>
                        &nbsp;<asp:TextBox ID="TextBox4" runat="server" Width="105px" MaxLength="4"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox4_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox4">
                    </ajaxToolkit:FilteredTextBoxExtender>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style5">
                        &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<asp:Label ID="Label2" runat="server" Text=" Desde:" 
                            Visible="False"></asp:Label>
                        &nbsp;&nbsp;&nbsp;</td>
                    <td class="style11">
                        <asp:TextBox ID="TextBox2" runat="server" Visible="False" MaxLength="4"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox2_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox2">
                    </ajaxToolkit:FilteredTextBoxExtender>
                    </td>
                    <td>
                        <asp:Label ID="Label3" runat="server" Text="Hasta:&nbsp;" Visible="False"></asp:Label>
                        &nbsp;&nbsp;
                        <asp:TextBox ID="TextBox3" runat="server" Width="137px" Visible="False" 
                            MaxLength="4"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox3_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox3">
                    </ajaxToolkit:FilteredTextBoxExtender>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style11">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>

        </asp:Panel>
        <asp:Panel ID="Panel3" runat="server" GroupingText="Buscar" Visible="False">

            <table class="style1">
                <tr>
                    <td class="style14">
                        &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Programa:
                    </td>
                    <td class="style11">
                        <asp:TextBox ID="TextBox8" runat="server" ReadOnly="True"></asp:TextBox>
                        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
                            Text="Buscar Programa" CssClass=JCIstyle />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style14">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td class="style11">
                        <asp:RadioButton ID="RadioButton8" runat="server" 
                            Text="Por Gestion Especifica" AutoPostBack="True" Checked="True" 
                            GroupName="as" oncheckedchanged="RadioButton8_CheckedChanged" />
                    </td>
                    <td>
                        <asp:RadioButton ID="RadioButton9" runat="server" 
                            Text="Por rango de Gestiones" AutoPostBack="True" GroupName="as" 
                            oncheckedchanged="RadioButton9_CheckedChanged" />
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style14">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label6" runat="server" Text="Gestion:&nbsp;"></asp:Label>
                    </td>
                    <td class="style11">
                        <asp:TextBox ID="TextBox5" runat="server" MaxLength="4"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox5_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox5">
                    </ajaxToolkit:FilteredTextBoxExtender>
                    </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style14">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label7" runat="server" Text="Desde:" Visible="False"></asp:Label>
                    </td>
                    <td class="style11">
                        <asp:TextBox ID="TextBox6" runat="server" Visible="False" MaxLength="4"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox6_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox6">
                    </ajaxToolkit:FilteredTextBoxExtender>
                    </td>
                    <td>
                        <asp:Label ID="Label8" runat="server" Text="Hasta:" Visible="False"></asp:Label>
                        &nbsp;
                        <asp:TextBox ID="TextBox7" runat="server" Visible="False" MaxLength="4"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox7_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox7">
                    </ajaxToolkit:FilteredTextBoxExtender>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>

        </asp:Panel>
        <asp:Panel ID="Panel4" runat="server">

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:RadioButton ID="RadioButton5" runat="server" Text="Todos" 
                AutoPostBack="True" Checked="True" GroupName="opcion" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:RadioButton ID="RadioButton6" runat="server" Text="Abiertos" 
                AutoPostBack="True" GroupName="opcion" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:RadioButton ID="RadioButton7" runat="server" 
                oncheckedchanged="RadioButton7_CheckedChanged" Text="Cerrados" 
                AutoPostBack="True" GroupName="opcion" />
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<asp:Label 
                ID="Label1" runat="server" ForeColor="Red"></asp:Label>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Button1" runat="server" Text="Buscar" onclick="Button1_Click" CssClass=JCIstyle/>
            <br />
            <br />
            <asp:DataList ID="DataList1" runat="server" 
                onitemcommand="DataList1_ItemCommand" style="text-align: left" 
                onselectedindexchanged="DataList1_SelectedIndexChanged1">
                <HeaderTemplate>
                    <tr style="color: #000000">
                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                            <asp:Label ID="Label13" runat="server" Text="ID"></asp:Label>
                        </td>
                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                            <asp:Label ID="Label9" runat="server" Text="Nombre"></asp:Label>
                        </td>
                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                            <asp:Label ID="Label10" runat="server" Text="FechaInicio"></asp:Label>
                        </td>
                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                            <asp:Label ID="Label11" runat="server" Text="FechaFin"></asp:Label>
                        </td> 
                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                            <asp:Label ID="Label12" runat="server" Text="Estado"></asp:Label>
                        </td>                                                           
                    </tr>                  
                </HeaderTemplate>
                <ItemTemplate>
                    <tr  style="color: #000000">
                     <td style='border:2px solid #123456;'>
                                  <asp:Label ID="ID" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                           </td>
                        <td style='border:2px solid #123456;'>
                                  <asp:Label ID="Nombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Label>
                           </td>
                                <td style='border:2px solid #123456;'>
                                    <asp:Label ID="FechaInicio" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Label>
                                </td>
                                <td style='border:2px solid #123456;'>
                                    <asp:Label ID="FechaFin" runat="server" Text='<%# Eval("FechaFin") %>'></asp:Label>
                                </td >
                                <td style='border:2px solid #123456;'>
                                    <asp:Label ID="Estado" runat="server" Text='<%# Eval("EstadoTexto") %>'></asp:Label>
                                </td>
                         <td style='border:2px solid #123456;'>
                                    <asp:LinkButton ID="Cerrar" runat="server" CommandName="Cerrar" 
                                        Visible='<%# ((bool)Eval("Estado")==false ? true : false)  %>' 
                                        onclick="Cerrar_Click">Cerrar Tarea</asp:LinkButton>
                                    <ajaxToolkit:ConfirmButtonExtender ID="Cerrar_ConfirmButtonExtender" 
                                        runat="server" ConfirmText="Esta seguro que desea cerrar esta Tarea? una vez cerrada  la Tarea no podra tener acceso al manejo de esta Tarea" 
                                        Enabled="True" TargetControlID="Cerrar">
                                    </ajaxToolkit:ConfirmButtonExtender>
                                </td>
                                 <td style='border:2px solid #123456;'>
                                    <asp:LinkButton ID="Modificar" runat="server" CommandName="Modificar" 
                                        Visible='<%# ((bool)Eval("Estado")==false ? true : false)  %>' 
                                        onclick="Modificar_Click">Modificar Tarea</asp:LinkButton>                                    
                                </td>
                                <td style='border:2px solid #123456;'>
                                    <asp:LinkButton ID="Eliminar" runat="server" CommandName="Eliminar" 
                                        Visible='<%# ((bool)Eval("Estado")==false ? true : false)  %>' 
                                        onclick="Eliminar_Click">Eliminar Tarea</asp:LinkButton>
                                    <ajaxToolkit:ConfirmButtonExtender ID="Eliminar_ConfirmButtonExtender" 
                                        runat="server" ConfirmText="Esta seguro que desea eliminar esta Tarea?" 
                                        Enabled="True" TargetControlID="Eliminar">
                                    </ajaxToolkit:ConfirmButtonExtender>
                                </td>
                                 <td style='border:2px solid #123456;'>
                                    <asp:LinkButton ID="Ver" runat="server" CommandName="Ver" 
                                        Visible='<%#  (true)  %>' 
                                        onclick="Ver_Click">Ver Tarea</asp:LinkButton>                                    
                                </td>                                
                         
                    </tr>                    
                </ItemTemplate>
            </asp:DataList>

        </asp:Panel>
        </asp:Panel>
        
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
